/**
 * Copyright (c) 2013-2022 Nikita Koksharov
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.redisson.config;
/**
 * 读取模式枚举，定义了数据读取的不同策略。
 */
public enum ReadMode {

    /**
     * 从从节点读取数据。在分布式系统或数据库集群中，从节点通常用于处理读请求，以减轻主节点的压力。
     */
    SLAVE,

    /**
     * 从主节点读取数据。在分布式系统或数据库集群中，主节点通常负责数据的写操作和部分读操作。
     */
    MASTER,

    /**
     * 首先尝试从主节点读取数据，如果主节点不可用，则尝试从从节点读取。这种模式平衡了数据读取的可靠性和性能。
     */
    MASTER_SLAVE,

}
